import { createApp } from "vue";
import App from "./App.vue";
import setupPlugins from "@/plugins";

// 本地SVG图标
import "virtual:svg-icons-register";

// 样式
import "element-plus/theme-chalk/dark/css-vars.css";
import "@/styles/index.scss";
import "uno.css";
import "animate.css";

// ECharts 按需引入
import * as echarts from 'echarts/core'
import { CanvasRenderer } from 'echarts/renderers'
import { TitleComponent, TooltipComponent, GridComponent, LegendComponent } from 'echarts/components'
import { LineChart } from 'echarts/charts'
echarts.use([
  CanvasRenderer,
  TitleComponent,
  TooltipComponent,
  GridComponent,
  LegendComponent,
  LineChart
])

import VueECharts from 'vue-echarts'
import { initSidebarTheme } from '@/utils/sidebar'

const app = createApp(App);
app.use(setupPlugins);
app.component('v-chart', VueECharts)

// 初始化侧边栏配色
initSidebarTheme()

app.mount("#app");
